package com.dandelion.business.entity.vo.menu.req;


import com.dandelion.business.entity.vo.validationgroup.BaseInsert;
import com.dandelion.business.entity.vo.validationgroup.BaseUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;


/**
 * 添加菜单申请实体
 *
 * @author 77088
 * @date 2021/12/28
 */

@Data
@ApiModel(value = "添加菜单申请实体")
public class MenuReqVO {

    @Null(message = "id必须为空", groups = {BaseInsert.class})
    @NotNull(message = "id不能为空", groups = {BaseUpdate.class})
    @ApiModelProperty(value = "菜单id,新增是为空,修改时必填")
    private Long id;

    @NotBlank(message = "菜单名称不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "菜单名称,新增是必传", required = true)
    private String menuName;

    @NotBlank(message = "路由地址不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "路由地址", required = true)
    private String path;

    @NotBlank(message = "组件路径不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "组件路径", required = true)
    private String component;

    @NotNull(message = "父级id不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "父级id,顶级时传0", required = true)
    private Integer pid;

    @NotNull(message = "是否显示不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "是否显示,1:显示,0:隐藏", required = true)
    private Integer display;

    @NotNull(message = "是否显示不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "菜单状态,1:正常,0:停止使用", required = true)
    private Integer state;

    @NotBlank(message = "权限代码不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "权限代码", required = true)
    private String perms;

    @NotNull(message = "菜单类型不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "类型:1:模块,2:菜单,3:按钮", required = true)
    private Integer type;

    @Length(min = 1, max = 100, message = "图标长度1-100")
    @ApiModelProperty(value = "图标")
    private String icon;

    @Length(min = 1, max = 100, message = "备注长度1-100")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "排序:默认99")
    private Integer sort = 99;


}
